import { enableProdMode, NgModuleRef } from '@angular/core';
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
// import { lifeCycleCallBack } from '@ds/ds-micro';

import { AppModule } from './app/app.module';
import { environment } from './environments/environment';
export * from '@ds/ds-micro-lib/dist';

if (environment.production) {
  enableProdMode();
}

let app: void | NgModuleRef<AppModule>;
async function render() {
  app = await platformBrowserDynamic()
    .bootstrapModule(AppModule)
    .catch((err) => console.error(err));
}

render();

// lifeCycleCallBack({
//   bootstrap: (data) => {
//    
//   },
//   mount: (data) => {
//     render();
//   },
//   unmount: () => {
//     // @ts-ignore
//     app.destroy();
//   },
// });
